{echo:JS::import('form');}
<h1 class="page_title">首页产品版块编辑{$in_pc[t_id]}</h1>
<div id="obj_form" class="form2">
    <form action="{url:/content/index_save}" method="post" >
        {if:isset($in_pc[t_id])}<input type="hidden" name="tid" value="{$in_pc[t_id]}">{/if}
    <dl class="lineD">
      <dt>版块标题：</dt>
      <dd>
        <input name="t_title" type="text" pattern="required" value="{$in_pc[t_title]}">
        <label>导航名称</label>
      </dd>
      </dl>
       <dl class="lineD">
      <dt>所属分类：</dt>
      <dd>
        <select name="t_type" pattern="[1-9]\d*" alt="请选择类别">
              <option value="0">选择类别</option>
              {query:name=goods_category where=parent_id eq 63 or parent_id eq 64}
                    <option value="{$item['id']}" {if:$in_pc[t_type]==$item['id']}selected{/if}>
                    {if:$item['parent_id']==63}
                    	品牌商城-
                    {elseif:$item['parent_id']==64}
                    	积分商城-
                    {/if}
                    {$item['name']}</option>
              {/query}
            </select>
      </dd>
      </dl>
      <dl class="lineD">
      <dt>版块基色：</dt>
      <dd><input name="t_color" type="color" id="color" value="{$in_pc[t_color]}" /></dd>
      <!-- <dd><button type="button" id="btn">弹出色盘</button></dd> -->
      </dl>
      <dl class="lineD">
      <dt>排序：</dt>
      <dd>
        <input name="t_px" type="text" class="small" pattern="int" value="{$in_pc[t_px]|1}">
        <label>数值越大越靠前</label>
      </dd>
      </dl>
       <dl class="lineD">
      <dt>广告代码：</dt>
      <dd>
        <input name="t_ad" type="text" class="big" pattern="" value="{$in_pc[t_ad]}" ><label>输入广告参数</label>
      </dd>
      </dl>
       <dl class="lineD">
      <dt>是否开启广告：</dt>
      <dd>
        <input name="ad_show" type="radio" value="1" checked="checked">
        <label>开启</label>
        <input name="ad_show" type="radio" value="0" >
        <label>关闭</label>
      </dd>
      </dl>
    <div style="text-align:center"><input type="submit" value="提交" class="button">&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" value="重置" class="button"></div>
    </form>
</div>
<script type="text/javascript">
var form =  new Form();
document.getElementById('btn').onclick = function(){
    document.getElementById('color').click();
};
</script>